package org.example.demo2.web;

import org.example.demo2.service.impl.LikeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName LikeController
 * @Description TODO
 * @Author Kx
 * @Date 2025/10/13 9:59
 * @Version 1.0
 */
@RestController
public class LikeController {
    @Autowired
    private LikeServiceImpl likeService;

    @PostMapping("/like")
    public void like(@RequestParam("userId") Integer userId, @RequestParam("postId") Integer postId) {
        likeService.like(postId, userId);
    }
}
